package com.hlf.modules.merchant.bank.service.impl;

import com.hlf.common.constants.Constants;
import com.hlf.modules.merchant.bank.entity.BankCardBin;
import com.hlf.modules.merchant.bank.mapper.BankCardBinMapper;
import com.hlf.modules.merchant.bank.service.BankCardBinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BankCardBinServiceImpl implements BankCardBinService {

	@Autowired
	private BankCardBinMapper bankCardBinMapper;
	
	@Override
	public String deleteByPrimaryKey(Short id) {
		bankCardBinMapper.deleteByPrimaryKey(id);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String insert(BankCardBin record) {
		bankCardBinMapper.insert(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String insertSelective(BankCardBin record) {
		bankCardBinMapper.insertSelective(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public BankCardBin selectByPrimaryKey(Short id) {
		return bankCardBinMapper.selectByPrimaryKey(id);
	}

	@Override
	public String updateByPrimaryKeySelective(BankCardBin record) {
		bankCardBinMapper.updateByPrimaryKeySelective(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String updateByPrimaryKey(BankCardBin record) {
		bankCardBinMapper.updateByPrimaryKey(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String getBankOrgCodeByCardNo(String bankCardNo) {
		return bankCardBinMapper.getBankOrgCodeByCardNo(bankCardNo);
	}

}
